function disposeTime(){
	var TimeName = $("#TimeName").val();
	var IsDefault = $("#IsDefault").val();
	var appointmentTime;
	var projectTime = new Object();
	var time = new Array();
	for(var i = 0; i < $(".nth1").length; i++){
		var beginTime = $(".beginTime").eq(i).val();
		var overTime = $(".overTime").eq(i).val();
		if(beginTime > overTime){
			alert("开始时间不能大于结束时间");
			return;
		}else{
			appointmentTime = beginTime + "—" + overTime;
			console.log("appointmentTime:" + appointmentTime);
			time.push(appointmentTime);
		}
	}
	console.log("time:" + time.toString());
	projectTime.TimeName = TimeName;
	projectTime.IsDefault = IsDefault;
	projectTime.time = time;
	projectTime.uid = $("#useridoflogin").val();
	console.log("projectTime:" + JSON.stringify(projectTime));
	saveTime(projectTime);
}

function saveTime(projectTime){
	$.ajax({
		//url:"http://localhost:8080/share_ins/time/projectTime/saveTime",
		//url :"http://localhost/time/projectTime/saveTime",
		url :Server + "/time/projectTime/saveTime",
		type:"POST",
		data:{"projectTime" : JSON.stringify(projectTime)},
		success : function(data) {
			console.log(JSON.stringify(data));
			alert("保存成功");
			$(location).attr("href","add18");
			//window.location.reload();
		},
		error : function(data) {
			console.log(JSON.stringify(data));
			alert("保存失败");
		}
	});
}